package com.niknik.woody.guice;

import com.google.inject.Singleton;
import com.niknik.woody.rest.jersey.RestExHandler;
import com.niknik.woody.rest.jersey.RestRespFormatter;
import com.sun.jersey.guice.JerseyServletModule;
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;

public class RestModule
    extends JerseyServletModule {

  @Override
  protected void configureServlets() {
    bind(RestRespFormatter.class).in(Singleton.class);
    bind(RestExHandler.class).in(Singleton.class);

    serve("/rest/*").with(GuiceContainer.class);
  }
}
